﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StrategyPattern
{
    class Context
    {
        private Strategy strategy;
        public Context(string type)
        {
            switch (type)
            {
                case "A":
                    strategy = new StrategyA();
                    break;
                case "B":
                    strategy = new StrategyB();
                    break;
                case "C":
                    strategy = new StrategyC();
                    break;
            }
        }
        public void Checked()
        {
            strategy.AlgorithmMethod();
        }

    }
}
